﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace VSM.Admin.UserManagement
{
    public class AccessRight : ElementBase
    {
        #region Fields
        private bool read_access = false;
        private bool add_access = false;
        private bool delete_access = false;
        private bool modify_access = false;
        private bool print_access = false;
        private bool post_access = false;
        private bool closeopendoc_access = false;
        private string object_id_language = string.Empty;
        private string id_module = string.Empty;
        private string id_object = string.Empty;
        private string id_group = string.Empty;
        private string id_dealer = string.Empty;
        private string createduser = string.Empty;
        private DateTime createdtime = DateTime.MinValue;
        private string updateduser = string.Empty;
        private DateTime updatedtime = DateTime.MinValue;
        #endregion

        #region Properties
        public bool Read_Access
        {
            get { return this.read_access; }
        }
        public bool Add_Access
        {
            get{ return this.add_access;}
        }
        public bool Delete_Access
        {
            get{ return this.delete_access;}
        }
        public bool Modify_Access
        {
            get{return this.modify_access;}
        }
        public bool Print_Access
        {
            get{ return this.print_access;}
        }
        public bool Post_Access
        {
            get { return this.post_access;}
        }

        public bool CloseOpenDoc_Access
        {
            get{ return this.closeopendoc_access;}
        }
        public string Object_ID_Language
        {
            get { return this.object_id_language;}
        }
        public string ID_Module
        {
            get{ return this.id_module;}
        }
        public string ID_Object
        {
            get { return this.id_object;}
        }
        public string ID_Group
        {
            get { return this.id_group;}
        }
        public string ID_Dealer
        {
            get { return this.id_dealer;}
        }
        public string CreatedUser
        {
            get { return this.createduser;}
        }
        public DateTime CreatedTime
        {
            get { return this.createdtime;}
        }
        public string UpdatedUser
        {
            get { return this.updateduser;}
        }
        public DateTime UpdatedTime
        {
            get { return this.updatedtime; }
        }

        #endregion

        #region Methods
        public AccessRight(
            bool Read_Access, bool Add_Access, bool Delete_Access, bool Modify_Access, bool Print_Access, bool Post_Access, bool CloseOpenDoc_Access, string Object_ID_Language, 
            string ID_Module, string ID_Object, string ID_Group, string ID_Dealer, string CreatedUser, DateTime CreatedTime, string UpdatedUser, DateTime UpdatedTime
        )
        { 
            this.read_access = Read_Access;
            this.add_access = Add_Access;
            this.delete_access = Delete_Access;
            this.modify_access = Modify_Access;
            this.print_access = Print_Access;
            this.post_access = Post_Access;
            this.closeopendoc_access = CloseOpenDoc_Access;
            this.object_id_language = Object_ID_Language;
            this.id_module = ID_Module;
            this.id_object = ID_Object;
            this.id_group = ID_Group;
            this.id_dealer = ID_Dealer;
            this.createduser = CreatedUser;
            this.createdtime = CreatedTime;
            this.updateduser = UpdatedUser;
            this.updatedtime = UpdatedTime;
        }
        #endregion
    }
}